package com.iceberg.adgt.domain;

import com.iceberg.adgt.common.DomainException;
import com.iceberg.adgt.common.Observable;
import com.iceberg.adgt.common.Observer;
import com.iceberg.adgt.common.ObserverInterest;

import java.util.Set;

/**
 * @author David
 */
public interface DomainFacade extends Observable {

	@Override
	void addObserver(Observer observer, ObserverInterest interest);

	void reset();

	ArchitectureDTO getArchitecture();

	StructureDTO getStructure();

	void setArchitectureAuthor(String name) throws DomainException;

	void setArchitectureName(String name) throws DomainException;

	void setStructureAuthor(String name) throws DomainException;

	void setStructureName(String name) throws DomainException;

	void addLayer(String name, int number) throws DomainException;

	void removeLayer(String name);

	void addUnitToLayer(String unitName, String type, String layerName) throws DomainException;

	void removeUnitFromLayer(String unitName, String unitType, String layerName);

	void addAllowedLayerToLayer(String fromLayer, String toLayer) throws DomainException;

	void removeAllowedLayerForLayer(String deleteLayer, String fromLayer) throws DomainException;

	Set<UnitTypeDTO> getUnitTypes();
}
